import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("notice", { schema: "chat" })
export class Notice {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("varchar", { name: "title", length: 50, default: () => "'用户id'" })
  title: string;

  @Column("varchar", { name: "content", length: 200 })
  content: string;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;

  @Column("int", { name: "update_time", unsigned: true, default: () => "'0'" })
  updateTime: number;

  @Column("int", { name: "push_time", unsigned: true, default: () => "'0'" })
  pushTime: number;
}
